# This file is part of BlackArch Linux ( http://blackarch.org ).
# See COPYING for license details.

pkgname=tor-router
pkgver=22.5b79c1c
pkgrel=1
pkgdesc='A tool that allow you to make TOR your default gateway and send all internet connections under TOR (as transparent proxy) for increase privacy/anonymity without extra unnecessary code.'
arch=('any')
groups=('blackarch' 'blackarch-defensive')
url='https://github.com/Edu4rdSHL/tor-router'
license=('GPL3')
depends=('tor')
makedepends=('git')
install=tor-router.install
source=("git+https://github.com/Edu4rdSHL/$pkgname.git"
        "$pkgname.install")
sha512sums=('SKIP'
            'SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd "$pkgname/files"

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 "$pkgname.service" \
    "$pkgdir/usr/lib/systemd/system/$pkgname.service"
  install -Dm 644 ../README.md "$pkgdir/usr/share/doc/$pkgname/README"
  install -Dm 644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

